package practice;

import java.util.*;

public class Day20 {
    //分割等和子集（01背包问题）
    //https://www.nowcoder.com/practice/65ade309fa4d4067a9add749721bfdc0?tpId=230&tqId=40433&ru=/exam/oj
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] arr = new int[n];
        int sum = 0;
        for(int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
            sum += arr[i];
        }
        int[][] dp = new int[n+1][sum+1];
        for(int i = 1; i <= sum; i++) {
            dp[0][i] = -1;
        }
        for(int i = 1; i <= n; i++) {
            for(int j = 1; j <= sum; j++) {
                if(j - arr[i-1] >= 0 && dp[i-1][j-arr[i-1]] != -1 ) {
                    dp[i][j] = Math.max(dp[i-1][j],arr[i-1]+dp[i-1][j-arr[i-1]]);
                }else {
                    dp[i][j] = -1;
                }
            }
        }
        boolean flag = false;
        if(sum % 2 != 0) {
            System.out.println(flag);
            return;
        }
        for(int i = 1; i <= n; i++) {
            if(dp[i][sum / 2] != -1) {
                flag = true;
                break;
            }
        }
        System.out.println(flag);
    }
    //主持人调度（一） 排序+模拟
    public boolean hostschedule (ArrayList<ArrayList<Integer>> schedule) {
        //new Comparator<>的时候最好把尖括号里面的参数加上，否则在牛客网上会出错。
        Collections.sort(schedule,new Comparator<ArrayList<Integer>>() {
            public int compare(ArrayList<Integer> a1, ArrayList<Integer> a2) {
                return a1.get(0) - a2.get(0);
            }
        });
        int m = schedule.size();
        for(int i = 0; i < m-1; i++) {
            if(schedule.get(i+1).get(0) < schedule.get(i).get(1)) {
                return false;
            }
        }
        return true;
    }
    //遥控温度
    private static int find(int[] arr,int left,int right,long fine) {
        int mid = 0;
        while(left <= right) {
            mid = left + (right - left) / 2;
            if(arr[mid] > fine) {
                right = mid - 1;
            }else if(arr[mid] == fine) {
                return mid;
            }else {
                left = mid + 1;
            }
        }
        return -1;
    }
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int p = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }

        Arrays.sort(arr);
        int max = arr[n-1];
        int min = arr[0];
        int ret = 0;
        for(int i = min; i <= max; i++) {
            long a = i-p;
            if(a < min) {
                a = min;
            }
            long b = i+p;
            if(b > max) {
                b = max;
            }
            int left = find(arr,0,n-1,a);
            int right = find(arr,0,n-1,b);
            ret = Math.max(ret,right-left+1);
        }
        System.out.println(ret);
    }

}
